package Java.Exception;

public class Exception {
    public static void f() {
        int[] arr = new int[10];
        arr[10] = 10;
        System.out.println("hello");
    }

    public static void h() {
        f();
    }

    public static void g() {
        int i = 10;
        if (i < 100) {
            h();
        }
    }

    public static void k() {
        try {
            g();
        } catch (java.lang.Exception e) {
            System.out.println("k()");
        }
    }

    public static void main(String[] args) {
        try {
            k();
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("数组索引越界");
            System.out.println(e.getMessage());
            System.out.println(e);
            e.printStackTrace();
        }
        System.out.println("main");
    }
}